CPU 686
BITS 32
%define EOI 20h 
%define PIC1_CMD  20h
%define DATA_REG 60h
extern _queuePut
extern _queueFull
extern _fila
global _Handler

section .text 
_Handler: 
	pusha
	
	mov edx, _fila
	push edx
	call _queueFull
	add esp, 4
	cmp eax, 0
	jnz fim
	xor eax,eax
	in al, DATA_REG
	push eax
	mov edx, _fila
	push edx
	call _queuePut
	add esp, 8
	
	
	
fim:	
	mov al, EOI 
	out PIC1_CMD, al
	popa
iretd
END